package com.y.mapper;

import com.y.entity.Permission;
import com.y.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.y.entity.vo.UserAndRole;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Yjh
 * @since 2021-09-24
 */
public interface UserMapper extends BaseMapper<User> {
    // 根据名字查询用户角色和权限
    User getUserRolesByUsername(String username);

    List<Permission> getPermissionByRoleId(Integer id);
    // 获取所有用户角色权限
    List<User> getListUser();
    // 搜索
    List<User> getListUserByUsername(String username);
}
